EasyAR HMD Extensions Sample

All device extension samples have been unified in the latest version. There is no code (except the one to import StreamingAssets files) in the sample to keep it simple. All features are configured in the scene. You need to learn basic feature usages from handheld samples, and there is no difference when using them on the device.

This sample show most EasyAR features in one scene, they can be switched on or off in runtime, they can be used together or one by one.

Please reference Motion Tracking and EasyAR Features, EasyAR HMD Extensions.

Mega Configurations

If you are using EasyAR Mega, you need to follow How to use Mega Unity Samples.

If you are not using EasyAR Mega, make sure to disable the Mega Tracker object under ARSession, there will be errors otherwise.

../_images/image_h1_2.png

How to Use

../_images/image_h1_1.png
Mark 1: Switch UI display mode. Initially the UI will keep unmoved in the physical world, when HUD is on the UI will keep displaying before eye.
Mark 2: Switch EIF recording on/off. You must turn it off after on to record a usable EIF file, otherwise the file would not be usable.
Mark 3: Switch planar image tracking on/off.
Mark 4: Switch dense spatial map on/off.
Mark 5: Switch sparse spatial map on/off.
Mark 6: Switch Mega on/off.

How It Works

Function switchs

All features are off when start. This is done by disable the corresponding script (not GameObject). The button will change enabled value of the scripts.

VIO reference

There is a cube of size 0.25*0.25*0.25 at VIO origin in the sample. It is used for VIO reference. This cube is helpful for problem breaking down. For example, when using Mega, some fast drift is caused by VIO (in another word, the defect of the device), and the cube will move in the same way. You can also know VIO accuracy visually with this cube.

About image tracking

EasyAR Motion Fusion is turned on in this sample, it can track image of specified size, and the image cannot move. You need to print namecard.jpg to A4 paper, and make sure the image fit width to the paper.

Sometimes the view point of eyewear does not reflect the camera image size. Try move the eyewear closer to the image if the image cannot be recognized. For general use, it is suggested to track lager images, like a 5m*5m image.

You can also turn off EasyAR Motion Fusion according to the document. But you will lose the ability to track the image when it is out of the scope. It is suggested to turn off motion fusion when writting a new device extension.

EasyAR Motion Fusion on,

../_images/image_h1_3.png

EasyAR Motion Fusion off,

../_images/image_h1_4.png

Please be noticed, wehther EasyAR Motion Fusion is on or off, the image target scale must be set to physical size in real-world when using HMD. Otherwise the display position will be wrong.

About Mega

You need to apply for trail fist. You can only use EasyAR Mega after your apply approved.

You need to follow How to use Mega Unity Samples. But before you read this document, make sure to read Getting Started of Mega first.

About Sample Creation

You can reference Finish The Package: Sample to know how the sample was created. But please notice that article is not written for app developers but for hardware venders.